\hypertarget{_l_u_f_a_descriptors_8c}{\section{C\-:/\-Dokumente und Einstellungen/skuser/\-Eigene Dateien/\-Chameleon-\/\-Mini-\/\-Git\-Hub/\-Chameleon-\/\-Mini-\/\-Open\-Source/\-Firmware/\-Chameleon-\/\-Mini/\-L\-U\-F\-A\-Descriptors.c File Reference}
\label{_l_u_f_a_descriptors_8c}\index{C\-:/\-Dokumente und Einstellungen/skuser/\-Eigene Dateien/\-Chameleon-\/\-Mini-\/\-Git\-Hub/\-Chameleon-\/\-Mini-\/\-Open\-Source/\-Firmware/\-Chameleon-\/\-Mini/\-L\-U\-F\-A\-Descriptors.\-c@{C\-:/\-Dokumente und Einstellungen/skuser/\-Eigene Dateien/\-Chameleon-\/\-Mini-\/\-Git\-Hub/\-Chameleon-\/\-Mini-\/\-Open\-Source/\-Firmware/\-Chameleon-\/\-Mini/\-L\-U\-F\-A\-Descriptors.\-c}}
}
{\ttfamily \#include \char`\"{}L\-U\-F\-A\-Descriptors.\-h\char`\"{}}\\*
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
uint16\-\_\-t \hyperlink{_l_u_f_a_descriptors_8c_a4d7def6e037bf75e86c24e3adb18d705}{C\-A\-L\-L\-B\-A\-C\-K\-\_\-\-U\-S\-B\-\_\-\-Get\-Descriptor} (const uint16\-\_\-t w\-Value, const uint8\-\_\-t w\-Index, const void $\ast$$\ast$const Descriptor\-Address)
\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
const U\-S\-B\-\_\-\-Descriptor\-\_\-\-Device\-\_\-t \\*
P\-R\-O\-G\-M\-E\-M \hyperlink{_l_u_f_a_descriptors_8c_addd196cc2b517282c4dc2a694313b6ac}{Device\-Descriptor}
\item 
const \\*
\hyperlink{struct_u_s_b___descriptor___configuration__t}{U\-S\-B\-\_\-\-Descriptor\-\_\-\-Configuration\-\_\-t} \\*
P\-R\-O\-G\-M\-E\-M \hyperlink{_l_u_f_a_descriptors_8c_a59d882a5961a04a054fab63be98c3b80}{Configuration\-Descriptor}
\item 
const U\-S\-B\-\_\-\-Descriptor\-\_\-\-String\-\_\-t \\*
P\-R\-O\-G\-M\-E\-M \hyperlink{_l_u_f_a_descriptors_8c_a2706320165dd3831bf525233371d7af9}{Language\-String}
\item 
const U\-S\-B\-\_\-\-Descriptor\-\_\-\-String\-\_\-t \\*
P\-R\-O\-G\-M\-E\-M \hyperlink{_l_u_f_a_descriptors_8c_a84557c5ab5d188d8d7cfdbfe6de20f02}{Manufacturer\-String}
\item 
const U\-S\-B\-\_\-\-Descriptor\-\_\-\-String\-\_\-t \\*
P\-R\-O\-G\-M\-E\-M \hyperlink{_l_u_f_a_descriptors_8c_ad68575f70b5d6ab576068eec9d59fafb}{Product\-String}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
U\-S\-B Device Descriptors, for library use when in U\-S\-B device mode. Descriptors are special computer-\/readable structures which the host requests upon device enumeration, to determine the device's capabilities and functions. 

\subsection{Function Documentation}
\hypertarget{_l_u_f_a_descriptors_8c_a4d7def6e037bf75e86c24e3adb18d705}{\index{L\-U\-F\-A\-Descriptors.\-c@{L\-U\-F\-A\-Descriptors.\-c}!C\-A\-L\-L\-B\-A\-C\-K\-\_\-\-U\-S\-B\-\_\-\-Get\-Descriptor@{C\-A\-L\-L\-B\-A\-C\-K\-\_\-\-U\-S\-B\-\_\-\-Get\-Descriptor}}
\index{C\-A\-L\-L\-B\-A\-C\-K\-\_\-\-U\-S\-B\-\_\-\-Get\-Descriptor@{C\-A\-L\-L\-B\-A\-C\-K\-\_\-\-U\-S\-B\-\_\-\-Get\-Descriptor}!LUFADescriptors.c@{L\-U\-F\-A\-Descriptors.\-c}}
\subsubsection[{C\-A\-L\-L\-B\-A\-C\-K\-\_\-\-U\-S\-B\-\_\-\-Get\-Descriptor}]{\setlength{\rightskip}{0pt plus 5cm}uint16\-\_\-t C\-A\-L\-L\-B\-A\-C\-K\-\_\-\-U\-S\-B\-\_\-\-Get\-Descriptor (
\begin{DoxyParamCaption}
\item[{const uint16\-\_\-t}]{w\-Value, }
\item[{const uint8\-\_\-t}]{w\-Index, }
\item[{const void $\ast$$\ast$const}]{Descriptor\-Address}
\end{DoxyParamCaption}
)}}\label{_l_u_f_a_descriptors_8c_a4d7def6e037bf75e86c24e3adb18d705}
This function is called by the library when in device mode, and must be overridden (see library \char`\"{}\-U\-S\-B Descriptors\char`\"{} documentation) by the application code so that the address and size of a requested descriptor can be given to the U\-S\-B library. When the device receives a Get Descriptor request on the control endpoint, this function is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the U\-S\-B host. 

\subsection{Variable Documentation}
\hypertarget{_l_u_f_a_descriptors_8c_a59d882a5961a04a054fab63be98c3b80}{\index{L\-U\-F\-A\-Descriptors.\-c@{L\-U\-F\-A\-Descriptors.\-c}!Configuration\-Descriptor@{Configuration\-Descriptor}}
\index{Configuration\-Descriptor@{Configuration\-Descriptor}!LUFADescriptors.c@{L\-U\-F\-A\-Descriptors.\-c}}
\subsubsection[{Configuration\-Descriptor}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf U\-S\-B\-\_\-\-Descriptor\-\_\-\-Configuration\-\_\-t} P\-R\-O\-G\-M\-E\-M Configuration\-Descriptor}}\label{_l_u_f_a_descriptors_8c_a59d882a5961a04a054fab63be98c3b80}
Configuration descriptor structure. This descriptor, located in F\-L\-A\-S\-H memory, describes the usage of the device in one of its supported configurations, including information about any device interfaces and endpoints. The descriptor is read out by the U\-S\-B host during the enumeration process when selecting a configuration so that the host may correctly communicate with the U\-S\-B device. \hypertarget{_l_u_f_a_descriptors_8c_addd196cc2b517282c4dc2a694313b6ac}{\index{L\-U\-F\-A\-Descriptors.\-c@{L\-U\-F\-A\-Descriptors.\-c}!Device\-Descriptor@{Device\-Descriptor}}
\index{Device\-Descriptor@{Device\-Descriptor}!LUFADescriptors.c@{L\-U\-F\-A\-Descriptors.\-c}}
\subsubsection[{Device\-Descriptor}]{\setlength{\rightskip}{0pt plus 5cm}const U\-S\-B\-\_\-\-Descriptor\-\_\-\-Device\-\_\-t P\-R\-O\-G\-M\-E\-M Device\-Descriptor}}\label{_l_u_f_a_descriptors_8c_addd196cc2b517282c4dc2a694313b6ac}
{\bfseries Initial value\-:}
\begin{DoxyCode}
=
\{
    .Header                 = \{.Size = \textcolor{keyword}{sizeof}(USB\_Descriptor\_Device\_t), .Type = DTYPE\_Device\},

    .USBSpecification       = VERSION\_BCD(01.10),
    .Class                  = CDC\_CSCP\_CDCClass,
    .SubClass               = CDC\_CSCP\_NoSpecificSubclass,
    .Protocol               = CDC\_CSCP\_NoSpecificProtocol,

    .Endpoint0Size          = FIXED\_CONTROL\_ENDPOINT\_SIZE,

    .VendorID               = 0x03EB,
    .ProductID              = 0x2044,
    .ReleaseNumber          = VERSION\_BCD(00.01),

    .ManufacturerStrIndex   = 0x01,
    .ProductStrIndex        = 0x02,
    .SerialNumStrIndex      = USE\_INTERNAL\_SERIAL,

    .NumberOfConfigurations = FIXED\_NUM\_CONFIGURATIONS
\}
\end{DoxyCode}
Device descriptor structure. This descriptor, located in F\-L\-A\-S\-H memory, describes the overall device characteristics, including the supported U\-S\-B version, control endpoint size and the number of device configurations. The descriptor is read out by the U\-S\-B host when the enumeration process begins. \hypertarget{_l_u_f_a_descriptors_8c_a2706320165dd3831bf525233371d7af9}{\index{L\-U\-F\-A\-Descriptors.\-c@{L\-U\-F\-A\-Descriptors.\-c}!Language\-String@{Language\-String}}
\index{Language\-String@{Language\-String}!LUFADescriptors.c@{L\-U\-F\-A\-Descriptors.\-c}}
\subsubsection[{Language\-String}]{\setlength{\rightskip}{0pt plus 5cm}const U\-S\-B\-\_\-\-Descriptor\-\_\-\-String\-\_\-t P\-R\-O\-G\-M\-E\-M Language\-String}}\label{_l_u_f_a_descriptors_8c_a2706320165dd3831bf525233371d7af9}
{\bfseries Initial value\-:}
\begin{DoxyCode}
=
\{
    .Header                 = \{.Size = USB\_STRING\_LEN(1), .Type = DTYPE\_String\},

    .UnicodeString          = \{LANGUAGE\_ID\_ENG\}
\}
\end{DoxyCode}
Language descriptor structure. This descriptor, located in F\-L\-A\-S\-H memory, is returned when the host requests the string descriptor with index 0 (the first index). It is actually an array of 16-\/bit integers, which indicate via the language I\-D table available at U\-S\-B.\-org what languages the device supports for its string descriptors. \hypertarget{_l_u_f_a_descriptors_8c_a84557c5ab5d188d8d7cfdbfe6de20f02}{\index{L\-U\-F\-A\-Descriptors.\-c@{L\-U\-F\-A\-Descriptors.\-c}!Manufacturer\-String@{Manufacturer\-String}}
\index{Manufacturer\-String@{Manufacturer\-String}!LUFADescriptors.c@{L\-U\-F\-A\-Descriptors.\-c}}
\subsubsection[{Manufacturer\-String}]{\setlength{\rightskip}{0pt plus 5cm}const U\-S\-B\-\_\-\-Descriptor\-\_\-\-String\-\_\-t P\-R\-O\-G\-M\-E\-M Manufacturer\-String}}\label{_l_u_f_a_descriptors_8c_a84557c5ab5d188d8d7cfdbfe6de20f02}
{\bfseries Initial value\-:}
\begin{DoxyCode}
=
\{
    .Header                 = \{.Size = USB\_STRING\_LEN(11), .Type = DTYPE\_String\},

    .UnicodeString          = L\textcolor{stringliteral}{"Dean Camera"}
\}
\end{DoxyCode}
Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable form, and is read out upon request by the host when the appropriate string I\-D is requested, listed in the Device Descriptor. \hypertarget{_l_u_f_a_descriptors_8c_ad68575f70b5d6ab576068eec9d59fafb}{\index{L\-U\-F\-A\-Descriptors.\-c@{L\-U\-F\-A\-Descriptors.\-c}!Product\-String@{Product\-String}}
\index{Product\-String@{Product\-String}!LUFADescriptors.c@{L\-U\-F\-A\-Descriptors.\-c}}
\subsubsection[{Product\-String}]{\setlength{\rightskip}{0pt plus 5cm}const U\-S\-B\-\_\-\-Descriptor\-\_\-\-String\-\_\-t P\-R\-O\-G\-M\-E\-M Product\-String}}\label{_l_u_f_a_descriptors_8c_ad68575f70b5d6ab576068eec9d59fafb}
{\bfseries Initial value\-:}
\begin{DoxyCode}
=
\{
    .Header                 = \{.Size = USB\_STRING\_LEN(13), .Type = DTYPE\_String\},

    .UnicodeString          = L\textcolor{stringliteral}{"LUFA CDC Demo"}
\}
\end{DoxyCode}
Product descriptor string. This is a Unicode string containing the product's details in human readable form, and is read out upon request by the host when the appropriate string I\-D is requested, listed in the Device Descriptor. 